﻿<UserControl x:Class="PenguinPublishNS.Views.HostRemoteDir"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:c="clr-namespace:PenguinPublishNS.Views"
             xmlns:local="clr-namespace:PenguinPublishNS" xmlns:models="clr-namespace:PenguinPublishNS.Models"
             mc:Ignorable="d" 
             d:DesignHeight="300" Width="503.178">
    <Grid d:DataContext="{d:DesignInstance Type=models:HostServer}" Margin="-19,0,0,-38">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="113*"/>
            <ColumnDefinition Width="283*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="29*"/>
            <RowDefinition Height="140*"/>
        </Grid.RowDefinitions>
        <StackPanel Height="34" VerticalAlignment="Top" Margin="10,0,0,0" Orientation="Horizontal" Grid.ColumnSpan="2">
            <Image HorizontalAlignment="Left" Height="42" Width="36" Source="/PenguinPublish;component/Images/32x32_preview.png" Stretch="None" VerticalAlignment="Top"/>
            <TextBlock x:Name="titleLabel" HorizontalAlignment="Left" Height="26" Margin="5,10,0,-2" TextWrapping="Wrap" Text="Select a host to list directory" VerticalAlignment="Top" Width="263" FontWeight="Bold"/>
        </StackPanel>
        <DataGrid x:Name="remDirGrid" Grid.Column="1" HorizontalAlignment="Left" Height="212" Margin="10,32,0,0" Grid.Row="1" VerticalAlignment="Top" Width="353"/>
        <ComboBox x:Name="cboHostNames" SelectedValuePath="hostId" DisplayMemberPath="hostName" SelectedIndex="0" HorizontalAlignment="Left" Height="24" Margin="170,5,0,0" VerticalAlignment="Top" Width="157" ItemsSource="{Binding hostName}" SelectionChanged="cboHostNames_SelectionChanged" Grid.Column="1" Loaded="cboHostNames_Loaded"/>
        <Label Content="Last Published" HorizontalAlignment="Left" Height="25" Margin="75,28,0,0" VerticalAlignment="Top" Width="90" Grid.Column="1"/>
        <TextBlock x:Name="txtLastPublished" HorizontalAlignment="Left" Height="24" Margin="170,33,0,0" TextWrapping="Wrap" Text="{Binding lastPublished}" VerticalAlignment="Top" Width="131" IsEnabled="False" Grid.Column="1"/>
        <UniformGrid x:Name="gridButtons" Margin="0,87,0,66" Rows="3" Grid.Row="1">
            <Button x:Name="btnCurrSnap" Content="Current Snapshot" HorizontalAlignment="Center" Height="27" VerticalAlignment="Top" Width="103" ToolTip="Attempts to use a full DirSync command in the API" IsEnabled="False"/>
            <Button x:Name="btnList" Content="List Host Files" HorizontalAlignment="Center" Height="27" Margin="0" VerticalAlignment="Top" Width="103" Click="btnList_Click" ToolTip="use the current target, dir connect to get live listing"/>
            <Button x:Name="btnCompare" Content="Compare Snapshot" HorizontalAlignment="Center" Height="27" Margin="0" VerticalAlignment="Top" Width="113" ToolTip="Compare snapshot to remote listing to see if we are out of sync" Click="btnCompare_Click"/>

        </UniformGrid>
        <TextBlock Grid.Column="1" HorizontalAlignment="Left" Height="17" Margin="13,10,0,0" Grid.Row="1" TextWrapping="Wrap" Text="Showing current snapshot by default" VerticalAlignment="Top" Width="234"/>
        <CheckBox x:Name="chkValidIP" Content="Ping Success" Height="18" VerticalAlignment="Top" Margin="43,35,10,0" IsChecked="{Binding ipAvailable}" IsEnabled="False"/>
        <Image HorizontalAlignment="Left" Height="77" Margin="43,0,0,0" Grid.Row="1" VerticalAlignment="Top" Width="77" Source="/PenguinPublish;component/Images/Construction.png"/>
    </Grid>
</UserControl>
